import { getRandomInt } from '../utils/tool.js';
import Actor from './Actor.js';

/** 星星类 */
export default class Star extends Actor {
    constructor(ctx, x, y, width, height, radius = 13, color = '#32CD32') {
        super(ctx, x, y, width, height, 'fillCircle', radius, color);
    }

    reSpaw() {
        this.x = getRandomInt(50, window.GameData, canvas.width - 50);
        this.y = getRandomInt(50, window.GameData, canvas.height - 50);
    }

    update() {}

    draw() {
        super.draw();
    }
}
